package la.renzhen.rtpt.demo.listener;

import la.renzhen.rtpt.spring.events.ReloadApplicationEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * <p>
 *
 * @author <a href="mailto:zhouhaichao@2008.sina.com">haiker</a>
 * @version 10/05/2018 7:07 PM
 */
@Slf4j
@Component
public class RefreshApplicationListener implements ApplicationListener<ReloadApplicationEvent> {

    @Override
    public void onApplicationEvent(ReloadApplicationEvent event) {
        log.info("配置刷新了，获取最新配合内容吧。这里可以做一些配置刷新后的服务内容改变。注意：自动刷新依然会发布刷新事件！");
    }

}
